This document is where Christine will play around with random stuff for funsies.

Article and Data

Article

Article: Hou, N., Li, M., He, L. et al. Predicting 30-days mortality for MIMIC-III patients with sepsis-3: a machine learning approach using XGboost. J Transl Med 18, 462 (2020). https://doi.org/10.1186/s12967-020-02620-5

Article’s data subset of MIMIC-III: https://translational-medicine.biomedcentral.com/articles/10.1186/s12967-020-02620-5

Load data

# Downloaded from: https://translational-medicine.biomedcentral.com/articles/10.1186/s12967-020-02620-5#Sec14

# This data has all of the patients included in the study, after they filtered out certain patients due to the exclusion criteria in the paper
# n = 4559

data <- read_csv("data/12967_2020_2620_MOESM1_ESM.csv")
## New names:
## Rows: 4559 Columns: 106
## ── Column specification
## ──────────────────────────────────────────────────────── Delimiter: "," chr
## (10): intime, outtime, dbsource, suspected_infection_time_poe, specimen_... dbl
## (96): icustay_id...1, hadm_id...2, suspected_infection_time_poe_days, po...
## ℹ Use `spec()` to retrieve the full column specification for this data. ℹ
## Specify the column types or set `show_col_types = FALSE` to quiet this message.
## • `icustay_id` -> `icustay_id...1`
## • `hadm_id` -> `hadm_id...2`
## • `hadm_id` -> `hadm_id...102`
## • `icustay_id` -> `icustay_id...103`

Corr matrix heatmap

PCA

Numerica data only

data_numeric <-  data %>%
   # select(-c(icustay_id...1, hadm_id...2, icustay_id...103, hadm_id...102,intime, outtime, dbsource, blood_culture_time, antibiotic_time_poe, suspected_infection_time_poe)) %>% 
 #   select(where(is.numeric))  %>% 
   select(suspected_infection_time_poe_days,
          age, 
          icu_los,
          hosp_los,
          sofa,
          lods,
          sirs,
          qsofa,
          aniongap_min:glucose_mean,
          urineoutput,
          icustay_id...1,
          thirtyday_expire_flag) %>% 
  na.omit()

PCA with prcomp

pca_result <- prcomp(data_numeric %>% select(-c(icustay_id...1),
                                             thirtyday_expire_flag), scale = TRUE)

loadings <- pca_result$rotation

loadings <- loadings[,1:10]

Loadings heatmap

# Convert the loadings matrix into a long format for ggplot
library(reshape2)
## 
## Attaching package: 'reshape2'
## The following object is masked from 'package:tidyr':
## 
##     smiths
loadings_melted <- melt(loadings)

# Plot the heatmap using ggplot
ggplot(loadings_melted, aes(x = Var2, y = Var1, fill = value)) +
  geom_tile() +
  scale_fill_gradient2(low = "blue", mid = "lightyellow", high = "red", midpoint = 0) +
  labs(title = "Heatmap of PCA Loadings", x = "Principal Components", y = "Variables") +
  theme_minimal()

Biplot

biplot(pca_result)

# library("FactoMineR")
# 
# fviz_pca_var(pca_result, col.var = "cos2",
#             gradient.cols = c("black", "orange", "green"),
#             repel = TRUE)

PCA Scatterplot

# Prepare data for plotting
scores <- as.data.frame(pca_result$x[, 1:6])  # Take PC1 and PC2
scores$thirty_day <- data_numeric %>% mutate(thirtyday_expire_flag = as.factor(thirtyday_expire_flag)) %>% pull(thirtyday_expire_flag) 
#colnames(scores) <- c("PC1", "PC2", "PC3", "PC4", "PC5", "thirty_day")

# Plot
ggplot(scores, aes(x = PC1, y = PC2, color = thirty_day)) +
  geom_point(size = 2, alpha = 0.6) +
  labs(title = "PC1 vs PC2", x = "Principal Component 1", y = "Principal Component 2") +
  theme_minimal() 

as.data.frame(loadings) %>%
  select(PC1) %>% 
  arrange(PC1)
##                                            PC1
## lods                              -0.244525156
## bun_mean                          -0.234082384
## sofa                              -0.232509237
## bun_max                           -0.231929597
## bun_min                           -0.229957848
## aniongap_max                      -0.225612252
## aniongap_min                      -0.210283764
## creatinine_max                    -0.196453038
## creatinine_min                    -0.194258016
## lactate_mean                      -0.191438884
## lactate_max                       -0.178574154
## lactate_min                       -0.172802224
## thirtyday_expire_flag             -0.155248501
## potassium_max                     -0.122045127
## inr_max                           -0.107805309
## inr_min                           -0.107537056
## resprate_mean                     -0.104052086
## qsofa                             -0.103418720
## potassium_min                     -0.096894285
## resprate_max                      -0.087662605
## sirs                              -0.083369111
## age                               -0.077663049
## wbc_max                           -0.074899202
## wbc_mean                          -0.071137555
## glucose_max                       -0.064550747
## wbc_min                           -0.059124616
## heartrate_max                     -0.049912161
## heartrate_mean                    -0.048911697
## resprate_min                      -0.041209652
## icu_los                           -0.022755100
## heartrate_min                     -0.015697845
## chloride_max                      -0.014856330
## suspected_infection_time_poe_days -0.013257860
## glucose_min1                       0.001379701
## hosp_los                           0.002878038
## glucose_mean                       0.004182707
## glucose_max1                       0.005076312
## glucose_min                        0.005656880
## sodium_max                         0.008963107
## platelet_max                       0.010599631
## meanbp_max                         0.018805641
## spo2_max                           0.020593365
## chloride_min                       0.022482637
## platelet_min                       0.034063385
## sodium_min                         0.035718971
## diasbp_max                         0.053352307
## hematocrit_max                     0.056051461
## hemoglobin_max                     0.069829014
## tempc_max                          0.069891825
## sysbp_max                          0.073659258
## hematocrit_min                     0.074688176
## hemoglobin_min                     0.092554676
## spo2_mean                          0.095770001
## tempc_min                          0.101968139
## tempc_mean                         0.104658606
## urineoutput                        0.111094282
## spo2_min                           0.122986930
## diasbp_mean                        0.135544167
## sysbp_mean                         0.150839918
## meanbp_mean                        0.157632737
## diasbp_min                         0.160743186
## bicarbonate_max                    0.161733803
## meanbp_min                         0.161773169
## sysbp_min                          0.177075346
## bicarbonate_min                    0.205408868

Correlations

Correlations of numeric variables

correlation_matrix <- cor(data_numeric)
knitr::kable(correlation_matrix)
suspected_infection_time_poe_days age icu_los hosp_los sofa lods sirs qsofa aniongap_min aniongap_max bicarbonate_min bicarbonate_max creatinine_min creatinine_max chloride_min chloride_max glucose_min glucose_max hematocrit_min hematocrit_max hemoglobin_min hemoglobin_max lactate_min lactate_max lactate_mean platelet_min platelet_max potassium_min potassium_max inr_min inr_max sodium_min sodium_max bun_min bun_max bun_mean wbc_min wbc_max wbc_mean heartrate_min heartrate_max heartrate_mean sysbp_min sysbp_max sysbp_mean diasbp_min diasbp_max diasbp_mean meanbp_min meanbp_max meanbp_mean resprate_min resprate_max resprate_mean tempc_min tempc_max tempc_mean spo2_min spo2_max spo2_mean glucose_min1 glucose_max1 glucose_mean urineoutput icustay_id…1 thirtyday_expire_flag
suspected_infection_time_poe_days 1.0000000 0.0812733 -0.0624862 -0.0221333 0.0135228 -0.0071291 -0.0267301 0.0277458 -0.0232908 -0.0055782 -0.0063998 -0.0137021 0.0112159 0.0218364 -0.0410565 -0.0358895 -0.0628499 -0.0184929 -0.0236989 -0.0768983 -0.0401235 -0.0793135 -0.0421326 -0.0312172 -0.0375822 -0.0217497 -0.0409379 0.0149410 -0.0297914 0.0739545 0.0524206 -0.0436303 -0.0830170 0.0240717 0.0370616 0.0315631 -0.0194453 -0.0295040 -0.0264613 0.0439523 -0.0068079 0.0089754 -0.0161272 -0.0861765 -0.0577416 -0.0293531 -0.0375271 -0.0588104 -0.0138791 -0.0410251 -0.0886116 0.0524223 0.0435641 0.0528290 0.0581881 0.0039266 0.0198364 0.0036013 -0.0453990 -0.0481477 -0.0415859 -0.0132164 -0.0137836 -0.0119551 -0.0084589 -0.0173108
age 0.0812733 1.0000000 -0.0901358 -0.1215177 0.0123870 0.1182639 -0.0913047 0.0929719 0.0669498 0.0093188 0.0438161 0.0218592 0.0509321 0.0128793 0.0192103 -0.0255476 0.0856644 0.0201283 -0.0367396 -0.1122674 -0.0914417 -0.1525319 -0.0373066 -0.0641970 -0.0602560 0.0649470 0.0321637 0.1154216 0.0455027 0.0916814 0.0573828 0.0855399 -0.0121137 0.2467083 0.2146749 0.2322748 0.0467862 0.0005416 0.0193343 -0.2036484 -0.2063788 -0.2440999 -0.1079972 0.0216951 -0.0364139 -0.3133126 -0.1026410 -0.3674439 -0.1953115 -0.0337572 -0.2693433 0.0340389 -0.0196468 0.0007756 -0.1431118 -0.2345896 -0.2501210 -0.0851686 -0.0353176 -0.0860738 0.0785254 0.0069965 0.0081376 -0.2763753 -0.0101197 0.1772220
icu_los -0.0624862 -0.0901358 1.0000000 0.6499505 0.2048570 0.1830845 0.1121036 0.0469583 0.0206584 0.0389478 -0.0441343 -0.0003815 0.0299033 0.0339372 0.0146366 0.0391198 0.0442039 0.0306388 0.0271484 0.0563232 0.0274219 0.0573940 -0.0271592 0.0497510 0.0273421 0.0040880 0.0231941 -0.0299834 0.0123211 -0.0273460 -0.0021820 0.0051461 0.0615114 0.0393615 0.0382080 0.0392441 0.0073051 0.0281595 0.0206868 0.0786056 0.1035452 0.0860310 -0.0583467 0.0913372 0.0000724 0.0021296 0.0439568 0.0227121 -0.0432787 0.1076699 0.0672537 0.0516834 0.0988055 0.1211758 -0.0010553 0.1268833 0.0997099 -0.0256045 0.0424000 0.0344667 0.0093629 0.0197749 0.0204950 -0.0089155 -0.0242882 -0.0102241
hosp_los -0.0221333 -0.1215177 0.6499505 1.0000000 0.1101795 0.0865576 0.0787748 0.0124239 -0.0414476 -0.0173780 -0.0124560 0.0012035 0.0258528 0.0284562 0.0334368 0.0393870 0.0050224 -0.0132934 -0.0883395 -0.0512160 -0.0753142 -0.0405945 -0.0772466 -0.0215727 -0.0425853 -0.0081676 0.0041459 -0.0375885 -0.0182605 -0.0153955 -0.0101813 -0.0015357 0.0268505 0.0353668 0.0350466 0.0356569 0.0019875 0.0246504 0.0163197 0.1122658 0.0988816 0.1046090 0.0194047 0.0688828 0.0460573 0.0555117 0.0270645 0.0483385 0.0354418 0.0542575 0.0876068 0.0161203 0.0480085 0.0434614 0.0054379 0.1228073 0.0995407 0.0377949 0.0588457 0.0902580 -0.0126121 0.0040071 0.0040438 -0.0128172 -0.0165423 -0.1813401
sofa 0.0135228 0.0123870 0.2048570 0.1101795 1.0000000 0.7644640 0.1842289 0.3231350 0.2985118 0.3771375 -0.3721692 -0.2438125 0.3178564 0.3404623 -0.0127009 0.0907286 -0.0628650 0.1222211 -0.1035911 -0.0052985 -0.1328046 -0.0244978 0.3121436 0.4103951 0.4106245 -0.2679697 -0.2027663 0.0848418 0.1953153 0.1818747 0.2006874 -0.0440892 0.0413716 0.3300848 0.3433073 0.3417443 0.0285831 0.1071778 0.0790523 0.0507235 0.1497691 0.1386518 -0.3673884 -0.0599765 -0.2682109 -0.2211002 -0.0371973 -0.1549190 -0.2810852 0.0649874 -0.1751363 0.0202231 0.1761317 0.2118559 -0.1613534 -0.0312606 -0.1049346 -0.2558091 -0.0106292 -0.1743942 -0.0633665 -0.0072559 -0.0058497 -0.2205385 -0.0005640 0.3237256
lods -0.0071291 0.1182639 0.1830845 0.0865576 0.7644640 1.0000000 0.1900754 0.3804935 0.2962945 0.3568909 -0.3099386 -0.1934927 0.3252514 0.3358441 0.0051077 0.1073567 -0.0104976 0.1597352 -0.1040773 -0.0095939 -0.1458308 -0.0489944 0.2657255 0.3480917 0.3486209 -0.1103169 -0.0495190 0.1242654 0.2328284 0.1974285 0.2079810 0.0148573 0.1019402 0.4373088 0.4455349 0.4476245 0.0828128 0.1345933 0.1183204 0.0116530 0.1554235 0.1226933 -0.4584655 -0.0263102 -0.2675377 -0.2739732 -0.0064273 -0.1671644 -0.3276622 0.0911883 -0.1896902 0.0242000 0.1734029 0.1938767 -0.1913054 -0.0767998 -0.1516729 -0.2687289 0.0141973 -0.1518186 -0.0218900 0.0046926 0.0067696 -0.2543048 0.0089577 0.3729420
sirs -0.0267301 -0.0913047 0.1121036 0.0787748 0.1842289 0.1900754 1.0000000 0.2509207 0.0921554 0.1499512 -0.2101774 -0.1557579 -0.0059904 0.0187909 0.0227138 0.1091153 0.0397654 0.0862943 -0.0056484 0.0791770 -0.0045032 0.0781884 0.1524951 0.1981783 0.1988974 0.0530149 0.1079456 -0.0479385 0.0439993 0.0348498 0.0476821 -0.0197161 0.0445727 -0.0086952 0.0088735 0.0008922 0.1828194 0.2251150 0.2158860 0.2687939 0.4525038 0.4084087 -0.1872565 0.0019412 -0.1308363 -0.0566920 0.0571126 0.0370986 -0.1179978 0.0617886 -0.0180551 0.1337837 0.2893844 0.2845932 -0.1256408 0.2338460 0.0777775 -0.1162151 -0.0201642 -0.0699082 0.0434819 -0.0179126 -0.0164220 0.0072929 0.0298233 0.1331194
qsofa 0.0277458 0.0929719 0.0469583 0.0124239 0.3231350 0.3804935 0.2509207 1.0000000 0.0414785 0.0650051 -0.0994421 -0.0642547 -0.0221460 -0.0093928 0.0543552 0.0953619 -0.0417175 0.0171585 -0.0043774 0.0237969 -0.0301682 0.0035364 0.0675156 0.0938059 0.0925355 0.0211002 0.0405768 -0.0041421 0.0554924 0.0512224 0.0573431 0.0435793 0.0622466 0.0424315 0.0547956 0.0498196 0.0303422 0.0560292 0.0475778 0.0659712 0.1679806 0.1294524 -0.4175411 -0.1071261 -0.3246591 -0.2468686 0.0208163 -0.1567462 -0.2934709 0.0444467 -0.2294056 0.0993752 0.2827421 0.2269910 -0.0396009 0.0556419 0.0128776 -0.1027512 0.0530371 -0.0278780 -0.0524577 0.0240832 0.0236223 -0.0395488 -0.0184437 0.1526530
aniongap_min -0.0232908 0.0669498 0.0206584 -0.0414476 0.2985118 0.2962945 0.0921554 0.0414785 1.0000000 0.6721734 -0.4351318 -0.4539867 0.5238954 0.4799998 -0.1400997 -0.1947934 0.0698897 0.0375372 0.0850518 -0.0300207 0.0576238 -0.0449384 0.4328377 0.3243150 0.3887579 0.0516324 0.0325061 0.2388293 0.1734643 0.1715342 0.1661580 -0.0211793 -0.0416273 0.4650767 0.4365450 0.4554597 0.1192628 0.0858941 0.1024707 0.0300791 0.0471466 0.0702251 -0.0512641 0.0249393 -0.0001741 -0.0638348 0.0525947 0.0021534 -0.0914773 0.0548885 -0.0151841 0.1126276 0.1383806 0.1932677 -0.1095316 -0.1144132 -0.1435462 -0.1752076 -0.0887129 -0.1916397 0.0828404 -0.0205308 -0.0183354 -0.1819667 0.0120199 0.2495941
aniongap_max -0.0055782 0.0093188 0.0389478 -0.0173780 0.3771375 0.3568909 0.1499512 0.0650051 0.6721734 1.0000000 -0.5967481 -0.3490963 0.4437734 0.5129909 -0.2549179 -0.0493055 0.0128094 0.2862293 0.0282556 0.0959483 0.0056759 0.0745615 0.4494639 0.5391572 0.5530536 -0.0206238 0.0532739 0.0819242 0.3018723 0.1248614 0.1893974 -0.0860949 0.0679867 0.3844655 0.4458854 0.4234595 0.0778715 0.1309655 0.1140314 0.0746489 0.1170963 0.1294309 -0.1049513 0.0244554 -0.0367139 -0.0711091 0.0697886 0.0271287 -0.1021427 0.0649250 -0.0118017 0.1057845 0.1466035 0.1999206 -0.1447516 -0.0983465 -0.1532956 -0.1669782 -0.0523883 -0.1421114 0.0230596 -0.0067087 -0.0034730 -0.1274123 0.0234918 0.2294968
bicarbonate_min -0.0063998 0.0438161 -0.0441343 -0.0124560 -0.3721692 -0.3099386 -0.2101774 -0.0994421 -0.4351318 -0.5967481 1.0000000 0.8136718 -0.2791121 -0.3153615 -0.2045416 -0.3876491 0.0549612 -0.1963937 0.1428165 0.0112030 0.1393979 0.0082640 -0.3329871 -0.4136688 -0.4202354 0.1364875 0.0517896 -0.0206980 -0.2133913 -0.0903353 -0.1231131 0.1458617 0.0038302 -0.2536149 -0.2907061 -0.2774462 -0.0595713 -0.1242376 -0.1023683 -0.0690946 -0.1453472 -0.1407150 0.2243522 0.0821419 0.2019872 0.1290683 0.0167313 0.0794506 0.1740158 -0.0461392 0.1176734 -0.0326822 -0.1013215 -0.1386737 0.1713238 0.0498785 0.1350920 0.0864839 -0.0491601 -0.0092813 0.0437532 0.0104095 0.0087257 0.1002120 -0.0076237 -0.1767267
bicarbonate_max -0.0137021 0.0218592 -0.0003815 0.0012035 -0.2438125 -0.1934927 -0.1557579 -0.0642547 -0.4539867 -0.3490963 0.8136718 1.0000000 -0.2239027 -0.1935101 -0.3449347 -0.3496405 0.0085408 -0.0144619 0.1151302 0.0813486 0.1046560 0.0687665 -0.2557817 -0.2244890 -0.2539679 0.0955831 0.0662041 -0.1069759 -0.0781398 -0.0886102 -0.0838831 0.0949420 0.0836512 -0.2358872 -0.2151455 -0.2275467 -0.0808345 -0.0847530 -0.0861521 -0.0433176 -0.0827068 -0.0903298 0.1710942 0.1010025 0.1859344 0.1010171 0.0551175 0.0983195 0.1371598 -0.0130838 0.1288492 -0.0181709 -0.0663584 -0.0932551 0.1151376 0.0429620 0.0960032 0.0364055 -0.0410432 -0.0221028 0.0147839 0.0046713 0.0042449 0.1103527 0.0165218 -0.1352511
creatinine_min 0.0112159 0.0509321 0.0299033 0.0258528 0.3178564 0.3252514 -0.0059904 -0.0221460 0.5238954 0.4437734 -0.2791121 -0.2239027 1.0000000 0.9201122 -0.0958169 -0.1123476 -0.0371313 0.0412654 -0.0621562 -0.1415181 -0.0923833 -0.1654508 0.0889786 0.0555570 0.0717159 -0.0195125 -0.0316862 0.2850902 0.2592965 0.1154504 0.1042554 -0.0278470 -0.0299225 0.6938144 0.6775101 0.6939694 0.0584397 0.0550034 0.0583388 -0.0164648 -0.0549321 -0.0346876 0.0053187 0.0305358 0.0320996 -0.0555581 0.0050377 -0.0416366 -0.0391587 0.0136069 -0.0367775 0.0193073 0.0285423 0.0515232 -0.0583650 -0.0817188 -0.0919718 -0.0563492 -0.0254946 -0.0708891 -0.0444851 -0.0098563 -0.0095523 -0.1696727 0.0052015 0.0941372
creatinine_max 0.0218364 0.0128793 0.0339372 0.0284562 0.3404623 0.3358441 0.0187909 -0.0093928 0.4799998 0.5129909 -0.3153615 -0.1935101 0.9201122 1.0000000 -0.1466053 -0.0785195 -0.0495240 0.0821835 -0.0649810 -0.0910390 -0.0902404 -0.1156819 0.1098405 0.1063598 0.1164103 -0.0226688 -0.0113261 0.2284117 0.3156160 0.0897851 0.1044313 -0.0565565 0.0016530 0.6285820 0.7065821 0.6799549 0.0397007 0.0560677 0.0514012 0.0098902 -0.0266856 -0.0046450 -0.0130810 0.0381861 0.0224687 -0.0551322 0.0080372 -0.0313301 -0.0425404 0.0222148 -0.0311307 0.0176229 0.0355056 0.0590987 -0.0616929 -0.0688216 -0.0839540 -0.0536455 -0.0135841 -0.0587401 -0.0488646 -0.0095508 -0.0090207 -0.1136359 0.0055870 0.0776271
chloride_min -0.0410565 0.0192103 0.0146366 0.0334368 -0.0127009 0.0051077 0.0227138 0.0543552 -0.1400997 -0.2549179 -0.2045416 -0.3449347 -0.0958169 -0.1466053 1.0000000 0.7292142 -0.0003094 -0.1552874 -0.0590836 -0.0511929 -0.0740842 -0.0732506 -0.1006267 -0.1012454 -0.1094553 -0.0987469 -0.1014257 -0.0142104 -0.1305873 -0.0069193 -0.0282146 0.7068261 0.5730242 -0.0073324 -0.0402249 -0.0255939 -0.0084542 -0.0154305 -0.0131427 -0.0095789 0.0358154 0.0135740 -0.0119457 -0.0093528 -0.0231402 -0.0086656 0.0108739 -0.0064383 -0.0044778 0.0427958 0.0033924 -0.0124108 0.0021802 -0.0056820 0.0337387 0.0555346 0.0617902 0.0663431 0.0624712 0.1004726 -0.0184696 -0.0046615 -0.0059035 -0.0098169 -0.0076536 -0.0287081
chloride_max -0.0358895 -0.0255476 0.0391198 0.0393870 0.0907286 0.1073567 0.1091153 0.0953619 -0.1947934 -0.0493055 -0.3876491 -0.3496405 -0.1123476 -0.0785195 0.7292142 1.0000000 -0.0728905 0.1198041 -0.1489513 0.0804901 -0.1580013 0.0644260 -0.0363822 0.0859545 0.0508771 -0.1639386 -0.0761177 -0.2315166 -0.0067125 -0.0618640 -0.0090513 0.5246056 0.7136983 -0.0391418 0.0026865 -0.0165591 -0.0438672 0.0199122 -0.0052774 -0.0039565 0.0827833 0.0481401 -0.1120145 -0.0142123 -0.0953627 -0.0459825 0.0097314 -0.0232770 -0.0669237 0.0712156 -0.0135995 -0.0326699 0.0065364 -0.0024787 -0.0714262 0.0640719 0.0074676 0.0704892 0.1162471 0.1565609 -0.0803340 0.0121050 0.0120619 0.0671247 0.0010170 -0.0032726
glucose_min -0.0628499 0.0856644 0.0442039 0.0050224 -0.0628650 -0.0104976 0.0397654 -0.0417175 0.0698897 0.0128094 0.0549612 0.0085408 -0.0371313 -0.0495240 -0.0003094 -0.0728905 1.0000000 0.3305415 0.1236026 0.0608293 0.1252372 0.0539410 0.0398320 -0.0003265 0.0135084 0.0678956 0.0503225 0.0845157 -0.0159414 -0.0482662 -0.0461145 0.0573789 -0.0052689 0.0280659 0.0086763 0.0177287 0.0757310 0.0392326 0.0554336 0.0142475 0.0361904 0.0208829 0.0530574 0.1027356 0.1149685 0.0026009 0.0409313 0.0353259 0.0102886 0.0459497 0.0611033 0.0497644 0.0101135 0.0480661 0.0294096 0.0068310 0.0191175 -0.0297870 -0.0568574 -0.0541048 0.7614344 0.0003363 0.0133402 -0.0303907 0.0019407 0.0149494
glucose_max -0.0184929 0.0201283 0.0306388 -0.0132934 0.1222211 0.1597352 0.0862943 0.0171585 0.0375372 0.2862293 -0.1963937 -0.0144619 0.0412654 0.0821835 -0.1552874 0.1198041 0.3305415 1.0000000 0.0092890 0.1507758 -0.0019692 0.1260126 0.1452387 0.2702762 0.2496018 -0.0227579 0.0386613 -0.0794328 0.1800676 -0.0452129 0.0197645 -0.1337021 0.1527956 0.0529583 0.1000088 0.0796407 0.0227178 0.0732271 0.0553054 -0.0115826 0.0568699 0.0311728 -0.0391055 0.1021895 0.0463789 -0.0475070 0.0388893 0.0082126 -0.0373947 0.0709016 0.0363190 0.0167378 0.0232562 0.0530667 -0.1063710 -0.0444826 -0.0919360 -0.0585705 0.0007780 -0.0275117 0.2518247 0.0003158 0.0108590 -0.0348485 0.0175538 0.0611368
hematocrit_min -0.0236989 -0.0367396 0.0271484 -0.0883395 -0.1035911 -0.1040773 -0.0056484 -0.0043774 0.0850518 0.0282556 0.1428165 0.1151302 -0.0621562 -0.0649810 -0.0590836 -0.1489513 0.1236026 0.0092890 1.0000000 0.6745751 0.9623416 0.6513255 -0.0012591 -0.1013120 -0.0752043 0.1471393 0.0392713 0.0594051 -0.0420549 0.0412139 -0.0497114 0.1100130 0.0357871 -0.1012288 -0.1102737 -0.1075601 0.1040336 0.0145808 0.0514096 -0.0129782 -0.0016084 -0.0182507 0.1278496 0.0531657 0.1048250 0.1770814 0.1453444 0.2299364 0.1043696 0.0579469 0.1674975 0.0711602 0.0211863 0.0777188 0.0934267 0.0276031 0.0743391 0.0012792 -0.1849598 -0.1468670 0.0990128 0.0010236 0.0018396 0.0532381 0.0311391 -0.0064443
hematocrit_max -0.0768983 -0.1122674 0.0563232 -0.0512160 -0.0052985 -0.0095939 0.0791770 0.0237969 -0.0300207 0.0959483 0.0112030 0.0813486 -0.1415181 -0.0910390 -0.0511929 0.0804901 0.0608293 0.1507758 0.6745751 1.0000000 0.6882982 0.9662067 0.0683544 0.1401334 0.1270153 -0.0317116 0.0225290 -0.0765096 0.1273935 -0.0576756 -0.0232436 0.0501094 0.1595749 -0.1908601 -0.1543911 -0.1732399 0.0152535 0.0578218 0.0425804 -0.0244080 0.0484814 0.0219705 -0.0087394 0.0851995 0.0390439 0.1340465 0.1256430 0.2087883 0.0518293 0.1055888 0.1864702 -0.0521235 -0.0341634 -0.0285346 -0.0053019 0.0335255 0.0352600 0.0096164 -0.0604264 -0.0234291 0.0385456 0.0011282 0.0025423 0.0632165 0.0319101 -0.0303086
hemoglobin_min -0.0401235 -0.0914417 0.0274219 -0.0753142 -0.1328046 -0.1458308 -0.0045032 -0.0301682 0.0576238 0.0056759 0.1393979 0.1046560 -0.0923833 -0.0902404 -0.0740842 -0.1580013 0.1252372 -0.0019692 0.9623416 0.6882982 1.0000000 0.7014852 -0.0077652 -0.1079129 -0.0823217 0.1056720 0.0029332 0.0255994 -0.0640010 0.0083790 -0.0688076 0.0758126 0.0052151 -0.1424942 -0.1482007 -0.1475266 0.0855234 0.0030823 0.0366590 -0.0131055 -0.0008212 -0.0164183 0.1457747 0.0656921 0.1246162 0.2053889 0.1440646 0.2572887 0.1313562 0.0680333 0.2006894 0.0555728 0.0025949 0.0492690 0.1087975 0.0580554 0.1049098 0.0255462 -0.1666566 -0.1167101 0.0956150 0.0016186 0.0022912 0.0888605 0.0277926 -0.0471794
hemoglobin_max -0.0793135 -0.1525319 0.0573940 -0.0405945 -0.0244978 -0.0489944 0.0781884 0.0035364 -0.0449384 0.0745615 0.0082640 0.0687665 -0.1654508 -0.1156819 -0.0732506 0.0644260 0.0539410 0.1260126 0.6513255 0.9662067 0.7014852 1.0000000 0.0654191 0.1289157 0.1177233 -0.0717903 -0.0162341 -0.1105602 0.0920204 -0.0807202 -0.0353093 0.0077684 0.1248577 -0.2269990 -0.1915033 -0.2103933 -0.0000206 0.0496215 0.0312192 -0.0275903 0.0420640 0.0179355 0.0081809 0.0859884 0.0488916 0.1533272 0.1197105 0.2211564 0.0674356 0.1089042 0.2037907 -0.0633887 -0.0465945 -0.0449139 0.0103929 0.0616540 0.0631064 0.0254603 -0.0571435 -0.0103864 0.0328451 0.0038502 0.0050079 0.0974892 0.0334956 -0.0597614
lactate_min -0.0421326 -0.0373066 -0.0271592 -0.0772466 0.3121436 0.2657255 0.1524951 0.0675156 0.4328377 0.4494639 -0.3329871 -0.2557817 0.0889786 0.1098405 -0.1006267 -0.0363822 0.0398320 0.1452387 -0.0012591 0.0683544 -0.0077652 0.0654191 1.0000000 0.6598263 0.8321454 -0.1502502 -0.0948645 0.0623910 0.1198022 0.2025704 0.2086080 -0.0637021 0.0187315 0.0869170 0.0877650 0.0885327 0.0257354 0.0771870 0.0590225 0.0704984 0.1535895 0.1709790 -0.1938234 -0.0493642 -0.1342434 -0.1052059 -0.0068612 -0.0310673 -0.1501592 0.0321447 -0.0766245 0.0640717 0.1153596 0.1580602 -0.1680815 -0.1114571 -0.1626937 -0.2349470 -0.0639917 -0.2015399 0.0449190 -0.0095518 -0.0072680 -0.1258101 0.0084118 0.2690391
lactate_max -0.0312172 -0.0641970 0.0497510 -0.0215727 0.4103951 0.3480917 0.1981783 0.0938059 0.3243150 0.5391572 -0.4136688 -0.2244890 0.0555570 0.1063598 -0.1012454 0.0859545 -0.0003265 0.2702762 -0.1013120 0.1401334 -0.1079129 0.1289157 0.6598263 1.0000000 0.9657760 -0.1954599 -0.0682408 -0.0390082 0.2167854 0.1240986 0.1974825 -0.0704965 0.1025649 0.0349175 0.0615957 0.0501113 0.0031891 0.1148578 0.0735764 0.0717140 0.1860640 0.1874251 -0.2425551 0.0071162 -0.1351603 -0.1088959 0.0068583 -0.0212759 -0.1610999 0.0716219 -0.0361816 0.0183962 0.1290290 0.1447545 -0.1913054 -0.0553848 -0.1349672 -0.2476247 0.0104234 -0.1328889 0.0218065 -0.0040261 -0.0005326 -0.1042962 0.0257046 0.2471064
lactate_mean -0.0375822 -0.0602560 0.0273421 -0.0425853 0.4106245 0.3486209 0.1988974 0.0925355 0.3887579 0.5530536 -0.4202354 -0.2539679 0.0717159 0.1164103 -0.1094553 0.0508771 0.0135084 0.2496018 -0.0752043 0.1270153 -0.0823217 0.1177233 0.8321454 0.9657760 1.0000000 -0.1961162 -0.0831084 -0.0072522 0.2013446 0.1615107 0.2177531 -0.0740164 0.0821602 0.0557720 0.0757536 0.0675430 0.0112371 0.1114104 0.0746741 0.0772609 0.1903345 0.1973417 -0.2459140 -0.0117879 -0.1460889 -0.1166821 0.0026931 -0.0264259 -0.1707266 0.0639538 -0.0531521 0.0356932 0.1350456 0.1613908 -0.1992052 -0.0793480 -0.1557670 -0.2638505 -0.0143963 -0.1676423 0.0315988 -0.0062684 -0.0029018 -0.1203997 0.0218740 0.2752361
platelet_min -0.0217497 0.0649470 0.0040880 -0.0081676 -0.2679697 -0.1103169 0.0530149 0.0211002 0.0516324 -0.0206238 0.1364875 0.0955831 -0.0195125 -0.0226688 -0.0987469 -0.1639386 0.0678956 -0.0227579 0.1471393 -0.0317116 0.1056720 -0.0717903 -0.1502502 -0.1954599 -0.1961162 1.0000000 0.9223550 0.0999002 0.0083539 -0.0237932 -0.0664409 -0.0129030 -0.0614480 -0.0199024 -0.0239953 -0.0224254 0.2600823 0.1347337 0.1903736 0.0103509 -0.0100342 -0.0137037 0.0601809 0.0199429 0.0554691 0.0034738 0.0148394 -0.0040425 -0.0047229 -0.0298862 -0.0065233 0.0726601 0.0278968 0.0530415 0.0428485 -0.0074990 0.0235209 0.0239941 -0.0187551 -0.0022933 0.0559910 0.0049274 0.0051341 0.0096978 -0.0209936 -0.0101746
platelet_max -0.0409379 0.0321637 0.0231941 0.0041459 -0.2027663 -0.0495190 0.1079456 0.0405768 0.0325061 0.0532739 0.0517896 0.0662041 -0.0316862 -0.0113261 -0.1014257 -0.0761177 0.0503225 0.0386613 0.0392713 0.0225290 0.0029332 -0.0162341 -0.0948645 -0.0682408 -0.0831084 0.9223550 1.0000000 0.0533543 0.0698505 -0.0405973 -0.0400715 -0.0276741 -0.0101067 -0.0279846 -0.0129210 -0.0200352 0.2250875 0.1745382 0.2012165 0.0206413 0.0269347 0.0181693 -0.0055669 0.0236150 0.0130829 -0.0271195 0.0098350 -0.0198492 -0.0454741 -0.0151602 -0.0179901 0.0458612 0.0248098 0.0472621 0.0000111 -0.0085829 0.0031619 0.0080231 0.0237973 0.0306634 0.0391793 0.0096104 0.0101817 -0.0033718 -0.0211086 0.0022787
potassium_min 0.0149410 0.1154216 -0.0299834 -0.0375885 0.0848418 0.1242654 -0.0479385 -0.0041421 0.2388293 0.0819242 -0.0206980 -0.1069759 0.2850902 0.2284117 -0.0142104 -0.2315166 0.0845157 -0.0794328 0.0594051 -0.0765096 0.0255994 -0.1105602 0.0623910 -0.0390082 -0.0072522 0.0999002 0.0533543 1.0000000 0.4198968 0.1133631 0.0470863 -0.0710207 -0.2314278 0.3552329 0.3027826 0.3309570 0.0700531 0.0054746 0.0318842 -0.0279484 -0.0831789 -0.0552119 -0.0397653 -0.0551517 -0.0539548 -0.0849828 -0.0412335 -0.0968760 -0.0339369 -0.0540852 -0.1225611 -0.0126762 -0.0175455 -0.0022931 -0.0303787 -0.1022785 -0.0804037 -0.0708411 -0.0829977 -0.1288684 0.0658830 -0.0199141 -0.0195391 -0.1579571 0.0039428 0.1088537
potassium_max -0.0297914 0.0455027 0.0123211 -0.0182605 0.1953153 0.2328284 0.0439993 0.0554924 0.1734643 0.3018723 -0.2133913 -0.0781398 0.2592965 0.3156160 -0.1305873 -0.0067125 -0.0159414 0.1800676 -0.0420549 0.1273935 -0.0640010 0.0920204 0.1198022 0.2167854 0.2013446 0.0083539 0.0698505 0.4198968 1.0000000 0.0522490 0.0734261 -0.1949707 -0.0612817 0.2302942 0.2745991 0.2578014 0.0032023 0.0435520 0.0287079 -0.0270794 -0.0091397 -0.0042812 -0.1060521 0.0374251 -0.0347425 -0.0893026 0.0137525 -0.0404493 -0.0746076 0.0343969 -0.0283628 -0.0186994 0.0239301 0.0154047 -0.1281028 -0.0979020 -0.1313895 -0.0717707 0.0152003 -0.0320127 -0.0362772 -0.0122508 -0.0107164 -0.0857641 0.0251347 0.1003650
inr_min 0.0739545 0.0916814 -0.0273460 -0.0153955 0.1818747 0.1974285 0.0348498 0.0512224 0.1715342 0.1248614 -0.0903353 -0.0886102 0.1154504 0.0897851 -0.0069193 -0.0618640 -0.0482662 -0.0452129 0.0412139 -0.0576756 0.0083790 -0.0807202 0.2025704 0.1240986 0.1615107 -0.0237932 -0.0405973 0.1133631 0.0522490 1.0000000 0.6402560 -0.0012639 -0.0471137 0.1874130 0.1607473 0.1751611 0.0511987 0.0254112 0.0367764 0.0415875 0.0491547 0.0712814 -0.0922970 -0.0956258 -0.1228894 -0.0868419 -0.0106378 -0.0686300 -0.0964942 -0.0268567 -0.1188658 0.0492596 0.0622360 0.0948923 -0.0649689 -0.0971124 -0.1067845 -0.1231541 -0.0870419 -0.1568140 -0.0236758 -0.0068269 -0.0071806 -0.0983888 0.0027774 0.1474604
inr_max 0.0524206 0.0573828 -0.0021820 -0.0101813 0.2006874 0.2079810 0.0476821 0.0573431 0.1661580 0.1893974 -0.1231131 -0.0838831 0.1042554 0.1044313 -0.0282146 -0.0090513 -0.0461145 0.0197645 -0.0497114 -0.0232436 -0.0688076 -0.0353093 0.2086080 0.1974825 0.2177531 -0.0664409 -0.0400715 0.0470863 0.0734261 0.6402560 1.0000000 -0.0084284 0.0051834 0.1463860 0.1450679 0.1475905 0.0156691 0.0265912 0.0230953 0.0419494 0.0629657 0.0785805 -0.0982911 -0.0495549 -0.0884225 -0.0799247 0.0257248 -0.0412416 -0.0819621 0.0019558 -0.0734207 0.0406190 0.0680373 0.0918930 -0.0732651 -0.0629829 -0.0846766 -0.1082724 -0.0293618 -0.0992017 -0.0092569 -0.0063518 -0.0059812 -0.0898411 -0.0069757 0.1375304
sodium_min -0.0436303 0.0855399 0.0051461 -0.0015357 -0.0440892 0.0148573 -0.0197161 0.0435793 -0.0211793 -0.0860949 0.1458617 0.0949420 -0.0278470 -0.0565565 0.7068261 0.5246056 0.0573789 -0.1337021 0.1100130 0.0501094 0.0758126 0.0077684 -0.0637021 -0.0704965 -0.0740164 -0.0129030 -0.0276741 -0.0710207 -0.1949707 -0.0012639 -0.0084284 1.0000000 0.7455490 0.0443498 0.0318502 0.0380325 -0.0047544 -0.0221720 -0.0158832 -0.0181557 0.0100010 -0.0106601 0.0832712 0.0662916 0.1036671 0.0382353 0.0874604 0.0753672 0.0426714 0.0545568 0.0797670 0.0653703 0.0565624 0.0630931 0.0744969 0.0466486 0.0788304 0.0162762 -0.0164815 -0.0089663 0.0432702 -0.0085552 -0.0089558 -0.0083221 0.0059208 -0.0088820
sodium_max -0.0830170 -0.0121137 0.0615114 0.0268505 0.0413716 0.1019402 0.0445727 0.0622466 -0.0416273 0.0679867 0.0038302 0.0836512 -0.0299225 0.0016530 0.5730242 0.7136983 -0.0052689 0.1527956 0.0357871 0.1595749 0.0052151 0.1248577 0.0187315 0.1025649 0.0821602 -0.0614480 -0.0101067 -0.2314278 -0.0612817 -0.0471137 0.0051834 0.7455490 1.0000000 0.0274873 0.0711119 0.0519415 -0.0360459 0.0023175 -0.0131748 -0.0146716 0.0717138 0.0363600 0.0332852 0.1111926 0.0939994 0.0319847 0.1166972 0.1076167 0.0194157 0.1170073 0.1272100 0.0236235 0.0320094 0.0338140 -0.0188830 0.0670638 0.0422517 0.0273112 0.0479815 0.0586718 -0.0117758 0.0106915 0.0115719 0.1003071 0.0234603 0.0239082
bun_min 0.0240717 0.2467083 0.0393615 0.0353668 0.3300848 0.4373088 -0.0086952 0.0424315 0.4650767 0.3844655 -0.2536149 -0.2358872 0.6938144 0.6285820 -0.0073324 -0.0391418 0.0280659 0.0529583 -0.1012288 -0.1908601 -0.1424942 -0.2269990 0.0869170 0.0349175 0.0557720 -0.0199024 -0.0279846 0.3552329 0.2302942 0.1874130 0.1463860 0.0443498 0.0274873 1.0000000 0.9478001 0.9843739 0.0992128 0.0626794 0.0797218 -0.0318377 -0.0775627 -0.0566487 -0.0731170 -0.0456812 -0.0633373 -0.1554409 -0.0416809 -0.1614253 -0.1139292 -0.0214562 -0.1659577 0.0480952 0.0496518 0.0854640 -0.1241071 -0.1810092 -0.1933052 -0.0820771 -0.0299561 -0.0984296 0.0081651 -0.0126143 -0.0113829 -0.1940303 0.0097082 0.2200017
bun_max 0.0370616 0.2146749 0.0382080 0.0350466 0.3433073 0.4455349 0.0088735 0.0547956 0.4365450 0.4458854 -0.2907061 -0.2151455 0.6775101 0.7065821 -0.0402249 0.0026865 0.0086763 0.1000088 -0.1102737 -0.1543911 -0.1482007 -0.1915033 0.0877650 0.0615957 0.0757536 -0.0239953 -0.0129210 0.3027826 0.2745991 0.1607473 0.1450679 0.0318502 0.0711119 0.9478001 1.0000000 0.9891390 0.0829899 0.0650034 0.0745984 -0.0127366 -0.0558836 -0.0356039 -0.0748220 -0.0318110 -0.0577407 -0.1466343 -0.0328361 -0.1435561 -0.1070499 -0.0116571 -0.1511968 0.0475535 0.0532643 0.0860772 -0.1221441 -0.1666075 -0.1806273 -0.0695945 -0.0197221 -0.0802577 -0.0040426 -0.0115419 -0.0101620 -0.1533536 0.0203694 0.1952228
bun_mean 0.0315631 0.2322748 0.0392441 0.0356569 0.3417443 0.4476245 0.0008922 0.0498196 0.4554597 0.4234595 -0.2774462 -0.2275467 0.6939694 0.6799549 -0.0255939 -0.0165591 0.0177287 0.0796407 -0.1075601 -0.1732399 -0.1475266 -0.2103933 0.0885327 0.0501113 0.0675430 -0.0224254 -0.0200352 0.3309570 0.2578014 0.1751611 0.1475905 0.0380325 0.0519415 0.9843739 0.9891390 1.0000000 0.0915635 0.0647903 0.0779448 -0.0217095 -0.0666144 -0.0457747 -0.0750238 -0.0386245 -0.0610828 -0.1526295 -0.0373466 -0.1536881 -0.1116342 -0.0163279 -0.1599968 0.0484310 0.0523023 0.0869308 -0.1246614 -0.1754454 -0.1888557 -0.0762672 -0.0246999 -0.0896936 0.0015313 -0.0121886 -0.0108589 -0.1741282 0.0157239 0.2092219
wbc_min -0.0194453 0.0467862 0.0073051 0.0019875 0.0285831 0.0828128 0.1828194 0.0303422 0.1192628 0.0778715 -0.0595713 -0.0808345 0.0584397 0.0397007 -0.0084542 -0.0438672 0.0757310 0.0227178 0.1040336 0.0152535 0.0855234 -0.0000206 0.0257354 0.0031891 0.0112371 0.2600823 0.2250875 0.0700531 0.0032023 0.0511987 0.0156691 -0.0047544 -0.0360459 0.0992128 0.0829899 0.0915635 1.0000000 0.8594810 0.9468466 0.0478621 0.0766992 0.0610407 -0.0299717 -0.0126310 -0.0133207 -0.0497936 -0.0128085 -0.0390490 -0.0544945 -0.0118833 -0.0392584 0.0663207 0.0501232 0.0950046 0.0189778 0.0012220 0.0061684 -0.0438232 -0.0696245 -0.0565016 0.0690263 -0.0048538 -0.0036118 -0.0517033 0.0085409 0.1124565
wbc_max -0.0295040 0.0005416 0.0281595 0.0246504 0.1071778 0.1345933 0.2251150 0.0560292 0.0858941 0.1309655 -0.1242376 -0.0847530 0.0550034 0.0560677 -0.0154305 0.0199122 0.0392326 0.0732271 0.0145808 0.0578218 0.0030823 0.0496215 0.0771870 0.1148578 0.1114104 0.1347337 0.1745382 0.0054746 0.0435520 0.0254112 0.0265912 -0.0221720 0.0023175 0.0626794 0.0650034 0.0647903 0.8594810 1.0000000 0.9782319 0.0365766 0.1069643 0.0781879 -0.0982071 0.0005970 -0.0422004 -0.0763510 -0.0152332 -0.0429993 -0.0888412 -0.0036665 -0.0421574 0.0433971 0.0570370 0.0916580 -0.0179526 0.0249825 -0.0004806 -0.0506624 -0.0321863 -0.0319341 0.0457733 -0.0023056 -0.0008113 -0.0443442 0.0125998 0.0901716
wbc_mean -0.0264613 0.0193343 0.0206868 0.0163197 0.0790523 0.1183204 0.2158860 0.0475778 0.1024707 0.1140314 -0.1023683 -0.0861521 0.0583388 0.0514012 -0.0131427 -0.0052774 0.0554336 0.0553054 0.0514096 0.0425804 0.0366590 0.0312192 0.0590225 0.0735764 0.0746741 0.1903736 0.2012165 0.0318842 0.0287079 0.0367764 0.0230953 -0.0158832 -0.0131748 0.0797218 0.0745984 0.0779448 0.9468466 0.9782319 1.0000000 0.0424484 0.0984512 0.0739850 -0.0739706 -0.0047520 -0.0319650 -0.0682631 -0.0147863 -0.0429125 -0.0780318 -0.0071315 -0.0424677 0.0542342 0.0562424 0.0962501 -0.0035936 0.0162180 0.0022017 -0.0496732 -0.0485202 -0.0430341 0.0568279 -0.0034214 -0.0019768 -0.0488961 0.0113965 0.1023994
heartrate_min 0.0439523 -0.2036484 0.0786056 0.1122658 0.0507235 0.0116530 0.2687939 0.0659712 0.0300791 0.0746489 -0.0690946 -0.0433176 -0.0164648 0.0098902 -0.0095789 -0.0039565 0.0142475 -0.0115826 -0.0129782 -0.0244080 -0.0131055 -0.0275903 0.0704984 0.0717140 0.0772609 0.0103509 0.0206413 -0.0279484 -0.0270794 0.0415875 0.0419494 -0.0181557 -0.0146716 -0.0318377 -0.0127366 -0.0217095 0.0478621 0.0365766 0.0424484 1.0000000 0.5878783 0.8471997 0.0321099 -0.1027449 -0.0591948 0.1702491 0.0598487 0.2045594 0.1084890 -0.0134068 0.0925230 0.2297466 0.2498155 0.3034886 0.2161717 0.2356228 0.2787744 0.0163618 -0.1053453 -0.0738212 0.0005014 -0.0257576 -0.0259006 -0.0019377 -0.0060132 0.0200838
heartrate_max -0.0068079 -0.2063788 0.1035452 0.0988816 0.1497691 0.1554235 0.4525038 0.1679806 0.0471466 0.1170963 -0.1453472 -0.0827068 -0.0549321 -0.0266856 0.0358154 0.0827833 0.0361904 0.0568699 -0.0016084 0.0484814 -0.0008212 0.0420640 0.1535895 0.1860640 0.1903345 -0.0100342 0.0269347 -0.0831789 -0.0091397 0.0491547 0.0629657 0.0100010 0.0717138 -0.0775627 -0.0558836 -0.0666144 0.0766992 0.1069643 0.0984512 0.5878783 1.0000000 0.8480524 -0.1775459 0.0526783 -0.1017818 0.0416706 0.1818202 0.2006660 -0.0440605 0.1066978 0.0929137 0.1382358 0.3552008 0.3261901 0.1063144 0.2679512 0.2216128 -0.1690604 -0.0446399 -0.1313366 0.0367681 -0.0149827 -0.0140096 0.0204819 -0.0236428 0.1112983
heartrate_mean 0.0089754 -0.2440999 0.0860310 0.1046090 0.1386518 0.1226933 0.4084087 0.1294524 0.0702251 0.1294309 -0.1407150 -0.0903298 -0.0346876 -0.0046450 0.0135740 0.0481401 0.0208829 0.0311728 -0.0182507 0.0219705 -0.0164183 0.0179355 0.1709790 0.1874251 0.1973417 -0.0137037 0.0181693 -0.0552119 -0.0042812 0.0712814 0.0785805 -0.0106601 0.0363600 -0.0566487 -0.0356039 -0.0457747 0.0610407 0.0781879 0.0739850 0.8471997 0.8480524 1.0000000 -0.1100292 -0.0390927 -0.1034158 0.1033563 0.1306166 0.2289440 0.0145647 0.0482158 0.0990945 0.1979325 0.3466049 0.3695816 0.1601557 0.2772901 0.2736739 -0.1204356 -0.0884089 -0.1468105 0.0223107 -0.0235410 -0.0228573 0.0022425 -0.0111424 0.1001082
sysbp_min -0.0161272 -0.1079972 -0.0583467 0.0194047 -0.3673884 -0.4584655 -0.1872565 -0.4175411 -0.0512641 -0.1049513 0.2243522 0.1710942 0.0053187 -0.0130810 -0.0119457 -0.1120145 0.0530574 -0.0391055 0.1278496 -0.0087394 0.1457747 0.0081809 -0.1938234 -0.2425551 -0.2459140 0.0601809 -0.0055669 -0.0397653 -0.1060521 -0.0922970 -0.0982911 0.0832712 0.0332852 -0.0731170 -0.0748220 -0.0750238 -0.0299717 -0.0982071 -0.0739706 0.0321099 -0.1775459 -0.1100292 1.0000000 0.2883747 0.7301143 0.5572585 0.1088310 0.4010805 0.6214279 0.0234266 0.5381099 0.0440562 -0.1344470 -0.1005975 0.1762518 0.0282110 0.1266852 0.2555683 -0.0587241 0.1254103 0.0442446 -0.0015801 -0.0017912 0.1093201 0.0308664 -0.2276601
sysbp_max -0.0861765 0.0216951 0.0913372 0.0688828 -0.0599765 -0.0263102 0.0019412 -0.1071261 0.0249393 0.0244554 0.0821419 0.1010025 0.0305358 0.0381861 -0.0093528 -0.0142123 0.1027356 0.1021895 0.0531657 0.0851995 0.0656921 0.0859884 -0.0493642 0.0071162 -0.0117879 0.0199429 0.0236150 -0.0551517 0.0374251 -0.0956258 -0.0495549 0.0662916 0.1111926 -0.0456812 -0.0318110 -0.0386245 -0.0126310 0.0005970 -0.0047520 -0.1027449 0.0526783 -0.0390927 0.2883747 1.0000000 0.7114262 0.1209116 0.5118459 0.3439629 0.1589988 0.4470785 0.5529976 -0.0639348 0.0231450 -0.0454359 0.0281936 0.0815352 0.0790346 -0.0107433 0.0626267 0.0444344 0.0709360 0.0364889 0.0385193 0.0640986 0.0000421 -0.0345566
sysbp_mean -0.0577416 -0.0364139 0.0000724 0.0460573 -0.2682109 -0.2675377 -0.1308363 -0.3246591 -0.0001741 -0.0367139 0.2019872 0.1859344 0.0320996 0.0224687 -0.0231402 -0.0953627 0.1149685 0.0463789 0.1048250 0.0390439 0.1246162 0.0488916 -0.1342434 -0.1351603 -0.1460889 0.0554691 0.0130829 -0.0539548 -0.0347425 -0.1228894 -0.0884225 0.1036671 0.0939994 -0.0633373 -0.0577407 -0.0610828 -0.0133207 -0.0422004 -0.0319650 -0.0591948 -0.1017818 -0.1034158 0.7301143 0.7114262 1.0000000 0.3926418 0.3381085 0.5005201 0.4575103 0.2430567 0.7439266 -0.0004823 -0.0790265 -0.0869310 0.1217515 0.0441316 0.1084808 0.1420003 -0.0085820 0.0909977 0.0929050 0.0083146 0.0098117 0.1023118 0.0119519 -0.1547163
diasbp_min -0.0293531 -0.3133126 0.0021296 0.0555117 -0.2211002 -0.2739732 -0.0566920 -0.2468686 -0.0638348 -0.0711091 0.1290683 0.1010171 -0.0555581 -0.0551322 -0.0086656 -0.0459825 0.0026009 -0.0475070 0.1770814 0.1340465 0.2053889 0.1533272 -0.1052059 -0.1088959 -0.1166821 0.0034738 -0.0271195 -0.0849828 -0.0893026 -0.0868419 -0.0799247 0.0382353 0.0319847 -0.1554409 -0.1466343 -0.1526295 -0.0497936 -0.0763510 -0.0682631 0.1702491 0.0416706 0.1033563 0.5572585 0.1209116 0.3926418 1.0000000 0.2112104 0.7178153 0.6992599 0.0801047 0.6525907 0.0167462 -0.0811438 -0.0756133 0.1347830 0.0584254 0.1217292 0.1964624 -0.0404639 0.1084790 -0.0005326 -0.0094231 -0.0103000 0.1313288 0.0293459 -0.1848383
diasbp_max -0.0375271 -0.1026410 0.0439568 0.0270645 -0.0371973 -0.0064273 0.0571126 0.0208163 0.0525947 0.0697886 0.0167313 0.0551175 0.0050377 0.0080372 0.0108739 0.0097314 0.0409313 0.0388893 0.1453444 0.1256430 0.1440646 0.1197105 -0.0068612 0.0068583 0.0026931 0.0148394 0.0098350 -0.0412335 0.0137525 -0.0106378 0.0257248 0.0874604 0.1166972 -0.0416809 -0.0328361 -0.0373466 -0.0128085 -0.0152332 -0.0147863 0.0598487 0.1818202 0.1306166 0.1088310 0.5118459 0.3381085 0.2112104 1.0000000 0.5830013 0.1330385 0.5528189 0.5164949 0.0255966 0.1029206 0.0719139 0.0350580 0.0424420 0.0353021 -0.0423668 0.0166860 -0.0225492 0.0341735 0.0047204 0.0052129 0.0898794 0.0033580 -0.0063294
diasbp_mean -0.0588104 -0.3674439 0.0227121 0.0483385 -0.1549190 -0.1671644 0.0370986 -0.1567462 0.0021534 0.0271287 0.0794506 0.0983195 -0.0416366 -0.0313301 -0.0064383 -0.0232770 0.0353259 0.0082126 0.2299364 0.2087883 0.2572887 0.2211564 -0.0310673 -0.0212759 -0.0264259 -0.0040425 -0.0198492 -0.0968760 -0.0404493 -0.0686300 -0.0412416 0.0753672 0.1076167 -0.1614253 -0.1435561 -0.1536881 -0.0390490 -0.0429993 -0.0429125 0.2045594 0.2006660 0.2289440 0.4010805 0.3439629 0.5005201 0.7178153 0.5830013 1.0000000 0.5026045 0.3098510 0.8761494 0.0459385 0.0348106 0.0348079 0.0866225 0.0512389 0.0791389 0.0801801 -0.0400625 0.0212731 0.0397748 -0.0196546 -0.0194867 0.1783257 0.0182551 -0.1092095
meanbp_min -0.0138791 -0.1953115 -0.0432787 0.0354418 -0.2810852 -0.3276622 -0.1179978 -0.2934709 -0.0914773 -0.1021427 0.1740158 0.1371598 -0.0391587 -0.0425404 -0.0044778 -0.0669237 0.0102886 -0.0373947 0.1043696 0.0518293 0.1313562 0.0674356 -0.1501592 -0.1610999 -0.1707266 -0.0047229 -0.0454741 -0.0339369 -0.0746076 -0.0964942 -0.0819621 0.0426714 0.0194157 -0.1139292 -0.1070499 -0.1116342 -0.0544945 -0.0888412 -0.0780318 0.1084890 -0.0440605 0.0145647 0.6214279 0.1589988 0.4575103 0.6992599 0.1330385 0.5026045 1.0000000 0.0267867 0.5617963 0.0162518 -0.1124245 -0.1001511 0.1231993 0.0216049 0.0901671 0.2060137 -0.0292187 0.1100898 0.0091468 -0.0009624 -0.0016253 0.1105455 0.0221147 -0.2021961
meanbp_max -0.0410251 -0.0337572 0.1076699 0.0542575 0.0649874 0.0911883 0.0617886 0.0444467 0.0548885 0.0649250 -0.0461392 -0.0130838 0.0136069 0.0222148 0.0427958 0.0712156 0.0459497 0.0709016 0.0579469 0.1055888 0.0680333 0.1089042 0.0321447 0.0716219 0.0639538 -0.0298862 -0.0151602 -0.0540852 0.0343969 -0.0268567 0.0019558 0.0545568 0.1170073 -0.0214562 -0.0116571 -0.0163279 -0.0118833 -0.0036665 -0.0071315 -0.0134068 0.1066978 0.0482158 0.0234266 0.4470785 0.2430567 0.0801047 0.5528189 0.3098510 0.0267867 1.0000000 0.4454905 -0.0545418 0.0612299 -0.0010258 -0.0358465 0.0108921 -0.0148360 -0.0363009 0.0611939 0.0322376 0.0202115 0.0184283 0.0193984 0.0310629 0.0157994 0.0258221
meanbp_mean -0.0886116 -0.2693433 0.0672537 0.0876068 -0.1751363 -0.1896902 -0.0180551 -0.2294056 -0.0151841 -0.0118017 0.1176734 0.1288492 -0.0367775 -0.0311307 0.0033924 -0.0135995 0.0611033 0.0363190 0.1674975 0.1864702 0.2006894 0.2037907 -0.0766245 -0.0361816 -0.0531521 -0.0065233 -0.0179901 -0.1225611 -0.0283628 -0.1188658 -0.0734207 0.0797670 0.1272100 -0.1659577 -0.1511968 -0.1599968 -0.0392584 -0.0421574 -0.0424677 0.0925230 0.0929137 0.0990945 0.5381099 0.5529976 0.7439266 0.6525907 0.5164949 0.8761494 0.5617963 0.4454905 1.0000000 -0.0275230 -0.0351802 -0.0618067 0.0739091 0.0467859 0.0823069 0.1180693 0.0148874 0.1000464 0.0517084 -0.0020661 -0.0012437 0.1630676 0.0231551 -0.1370553
resprate_min 0.0524223 0.0340389 0.0516834 0.0161203 0.0202231 0.0242000 0.1337837 0.0993752 0.1126276 0.1057845 -0.0326822 -0.0181709 0.0193073 0.0176229 -0.0124108 -0.0326699 0.0497644 0.0167378 0.0711602 -0.0521235 0.0555728 -0.0633887 0.0640717 0.0183962 0.0356932 0.0726601 0.0458612 -0.0126762 -0.0186994 0.0492596 0.0406190 0.0653703 0.0236235 0.0480952 0.0475535 0.0484310 0.0663207 0.0433971 0.0542342 0.2297466 0.1382358 0.1979325 0.0440562 -0.0639348 -0.0004823 0.0167462 0.0255966 0.0459385 0.0162518 -0.0545418 -0.0275230 1.0000000 0.3685568 0.6460988 0.0789652 0.0783197 0.0870738 -0.0607599 -0.1439369 -0.1597241 0.0715894 -0.0072149 -0.0062562 -0.0071280 0.0003704 0.0999479
resprate_max 0.0435641 -0.0196468 0.0988055 0.0480085 0.1761317 0.1734029 0.2893844 0.2827421 0.1383806 0.1466035 -0.1013215 -0.0663584 0.0285423 0.0355056 0.0021802 0.0065364 0.0101135 0.0232562 0.0211863 -0.0341634 0.0025949 -0.0465945 0.1153596 0.1290290 0.1350456 0.0278968 0.0248098 -0.0175455 0.0239301 0.0622360 0.0680373 0.0565624 0.0320094 0.0496518 0.0532643 0.0523023 0.0501232 0.0570370 0.0562424 0.2498155 0.3552008 0.3466049 -0.1344470 0.0231450 -0.0790265 -0.0811438 0.1029206 0.0348106 -0.1124245 0.0612299 -0.0351802 0.3685568 1.0000000 0.7664752 0.0703766 0.1664092 0.1250094 -0.2619358 -0.0988344 -0.2676078 0.0185905 0.0212014 0.0218038 -0.0256671 -0.0390161 0.1509153
resprate_mean 0.0528290 0.0007756 0.1211758 0.0434614 0.2118559 0.1938767 0.2845932 0.2269910 0.1932677 0.1999206 -0.1386737 -0.0932551 0.0515232 0.0590987 -0.0056820 -0.0024787 0.0480661 0.0530667 0.0777188 -0.0285346 0.0492690 -0.0449139 0.1580602 0.1447545 0.1613908 0.0530415 0.0472621 -0.0022931 0.0154047 0.0948923 0.0918930 0.0630931 0.0338140 0.0854640 0.0860772 0.0869308 0.0950046 0.0916580 0.0962501 0.3034886 0.3261901 0.3695816 -0.1005975 -0.0454359 -0.0869310 -0.0756133 0.0719139 0.0348079 -0.1001511 -0.0010258 -0.0618067 0.6460988 0.7664752 1.0000000 0.0709945 0.1574138 0.1280159 -0.2414596 -0.1747385 -0.3238055 0.0623447 -0.0045679 -0.0032301 -0.0319788 -0.0180761 0.2023105
tempc_min 0.0581881 -0.1431118 -0.0010553 0.0054379 -0.1613534 -0.1913054 -0.1256408 -0.0396009 -0.1095316 -0.1447516 0.1713238 0.1151376 -0.0583650 -0.0616929 0.0337387 -0.0714262 0.0294096 -0.1063710 0.0934267 -0.0053019 0.1087975 0.0103929 -0.1680815 -0.1913054 -0.1992052 0.0428485 0.0000111 -0.0303787 -0.1281028 -0.0649689 -0.0732651 0.0744969 -0.0188830 -0.1241071 -0.1221441 -0.1246614 0.0189778 -0.0179526 -0.0035936 0.2161717 0.1063144 0.1601557 0.1762518 0.0281936 0.1217515 0.1347830 0.0350580 0.0866225 0.1231993 -0.0358465 0.0739091 0.0789652 0.0703766 0.0709945 1.0000000 0.4301193 0.7281802 0.0686675 -0.0398874 -0.0100783 0.0104764 0.0027866 0.0013419 0.0906354 -0.0104526 -0.1561575
tempc_max 0.0039266 -0.2345896 0.1268833 0.1228073 -0.0312606 -0.0767998 0.2338460 0.0556419 -0.1144132 -0.0983465 0.0498785 0.0429620 -0.0817188 -0.0688216 0.0555346 0.0640719 0.0068310 -0.0444826 0.0276031 0.0335255 0.0580554 0.0616540 -0.1114571 -0.0553848 -0.0793480 -0.0074990 -0.0085829 -0.1022785 -0.0979020 -0.0971124 -0.0629829 0.0466486 0.0670638 -0.1810092 -0.1666075 -0.1754454 0.0012220 0.0249825 0.0162180 0.2356228 0.2679512 0.2772901 0.0282110 0.0815352 0.0441316 0.0584254 0.0424420 0.0512389 0.0216049 0.0108921 0.0467859 0.0783197 0.1664092 0.1574138 0.4301193 1.0000000 0.8614380 0.0501813 0.0456350 0.0641467 -0.0307518 -0.0092288 -0.0102113 0.1541713 -0.0064338 -0.1345385
tempc_mean 0.0198364 -0.2501210 0.0997099 0.0995407 -0.1049346 -0.1516729 0.0777775 0.0128776 -0.1435462 -0.1532956 0.1350920 0.0960032 -0.0919718 -0.0839540 0.0617902 0.0074676 0.0191175 -0.0919360 0.0743391 0.0352600 0.1049098 0.0631064 -0.1626937 -0.1349672 -0.1557670 0.0235209 0.0031619 -0.0804037 -0.1313895 -0.1067845 -0.0846766 0.0788304 0.0422517 -0.1933052 -0.1806273 -0.1888557 0.0061684 -0.0004806 0.0022017 0.2787744 0.2216128 0.2736739 0.1266852 0.0790346 0.1084808 0.1217292 0.0353021 0.0791389 0.0901671 -0.0148360 0.0823069 0.0870738 0.1250094 0.1280159 0.7281802 0.8614380 1.0000000 0.0800710 0.0118061 0.0533356 -0.0223591 -0.0043724 -0.0058906 0.1581612 -0.0051685 -0.1765326
spo2_min 0.0036013 -0.0851686 -0.0256045 0.0377949 -0.2558091 -0.2687289 -0.1162151 -0.1027512 -0.1752076 -0.1669782 0.0864839 0.0364055 -0.0563492 -0.0536455 0.0663431 0.0704892 -0.0297870 -0.0585705 0.0012792 0.0096164 0.0255462 0.0254603 -0.2349470 -0.2476247 -0.2638505 0.0239941 0.0080231 -0.0708411 -0.0717707 -0.1231541 -0.1082724 0.0162762 0.0273112 -0.0820771 -0.0695945 -0.0762672 -0.0438232 -0.0506624 -0.0496732 0.0163618 -0.1690604 -0.1204356 0.2555683 -0.0107433 0.1420003 0.1964624 -0.0423668 0.0801801 0.2060137 -0.0363009 0.1180693 -0.0607599 -0.2619358 -0.2414596 0.0686675 0.0501813 0.0800710 1.0000000 0.1690409 0.6788124 -0.0408485 0.0033003 0.0018118 0.0993658 0.0257457 -0.2135070
spo2_max -0.0453990 -0.0353176 0.0424000 0.0588457 -0.0106292 0.0141973 -0.0201642 0.0530371 -0.0887129 -0.0523883 -0.0491601 -0.0410432 -0.0254946 -0.0135841 0.0624712 0.1162471 -0.0568574 0.0007780 -0.1849598 -0.0604264 -0.1666566 -0.0571435 -0.0639917 0.0104234 -0.0143963 -0.0187551 0.0237973 -0.0829977 0.0152003 -0.0870419 -0.0293618 -0.0164815 0.0479815 -0.0299561 -0.0197221 -0.0246999 -0.0696245 -0.0321863 -0.0485202 -0.1053453 -0.0446399 -0.0884089 -0.0587241 0.0626267 -0.0085820 -0.0404639 0.0166860 -0.0400625 -0.0292187 0.0611939 0.0148874 -0.1439369 -0.0988344 -0.1747385 -0.0398874 0.0456350 0.0118061 0.1690409 1.0000000 0.5494079 -0.0910929 0.0066750 0.0056549 0.0373077 0.0062212 -0.0510881
spo2_mean -0.0481477 -0.0860738 0.0344667 0.0902580 -0.1743942 -0.1518186 -0.0699082 -0.0278780 -0.1916397 -0.1421114 -0.0092813 -0.0221028 -0.0708891 -0.0587401 0.1004726 0.1565609 -0.0541048 -0.0275117 -0.1468670 -0.0234291 -0.1167101 -0.0103864 -0.2015399 -0.1328889 -0.1676423 -0.0022933 0.0306634 -0.1288684 -0.0320127 -0.1568140 -0.0992017 -0.0089663 0.0586718 -0.0984296 -0.0802577 -0.0896936 -0.0565016 -0.0319341 -0.0430341 -0.0738212 -0.1313366 -0.1468105 0.1254103 0.0444344 0.0909977 0.1084790 -0.0225492 0.0212731 0.1100898 0.0322376 0.1000464 -0.1597241 -0.2676078 -0.3238055 -0.0100783 0.0641467 0.0533356 0.6788124 0.5494079 1.0000000 -0.0967653 0.0124929 0.0109234 0.0887085 0.0272801 -0.1779191
glucose_min1 -0.0415859 0.0785254 0.0093629 -0.0126121 -0.0633665 -0.0218900 0.0434819 -0.0524577 0.0828404 0.0230596 0.0437532 0.0147839 -0.0444851 -0.0488646 -0.0184696 -0.0803340 0.7614344 0.2518247 0.0990128 0.0385456 0.0956150 0.0328451 0.0449190 0.0218065 0.0315988 0.0559910 0.0391793 0.0658830 -0.0362772 -0.0236758 -0.0092569 0.0432702 -0.0117758 0.0081651 -0.0040426 0.0015313 0.0690263 0.0457733 0.0568279 0.0005014 0.0367681 0.0223107 0.0442446 0.0709360 0.0929050 -0.0005326 0.0341735 0.0397748 0.0091468 0.0202115 0.0517084 0.0715894 0.0185905 0.0623447 0.0104764 -0.0307518 -0.0223591 -0.0408485 -0.0910929 -0.0967653 1.0000000 0.0003042 0.0144560 -0.0280864 0.0152148 0.0332204
glucose_max1 -0.0132164 0.0069965 0.0197749 0.0040071 -0.0072559 0.0046926 -0.0179126 0.0240832 -0.0205308 -0.0067087 0.0104095 0.0046713 -0.0098563 -0.0095508 -0.0046615 0.0121050 0.0003363 0.0003158 0.0010236 0.0011282 0.0016186 0.0038502 -0.0095518 -0.0040261 -0.0062684 0.0049274 0.0096104 -0.0199141 -0.0122508 -0.0068269 -0.0063518 -0.0085552 0.0106915 -0.0126143 -0.0115419 -0.0121886 -0.0048538 -0.0023056 -0.0034214 -0.0257576 -0.0149827 -0.0235410 -0.0015801 0.0364889 0.0083146 -0.0094231 0.0047204 -0.0196546 -0.0009624 0.0184283 -0.0020661 -0.0072149 0.0212014 -0.0045679 0.0027866 -0.0092288 -0.0043724 0.0033003 0.0066750 0.0124929 0.0003042 1.0000000 0.9998400 -0.0002732 0.0232591 -0.0071976
glucose_mean -0.0137836 0.0081376 0.0204950 0.0040438 -0.0058497 0.0067696 -0.0164220 0.0236223 -0.0183354 -0.0034730 0.0087257 0.0042449 -0.0095523 -0.0090207 -0.0059035 0.0120619 0.0133402 0.0108590 0.0018396 0.0025423 0.0022912 0.0050079 -0.0072680 -0.0005326 -0.0029018 0.0051341 0.0101817 -0.0195391 -0.0107164 -0.0071806 -0.0059812 -0.0089558 0.0115719 -0.0113829 -0.0101620 -0.0108589 -0.0036118 -0.0008113 -0.0019768 -0.0259006 -0.0140096 -0.0228573 -0.0017912 0.0385193 0.0098117 -0.0103000 0.0052129 -0.0194867 -0.0016253 0.0193984 -0.0012437 -0.0062562 0.0218038 -0.0032301 0.0013419 -0.0102113 -0.0058906 0.0018118 0.0056549 0.0109234 0.0144560 0.9998400 1.0000000 -0.0010655 0.0235955 -0.0058062
urineoutput -0.0119551 -0.2763753 -0.0089155 -0.0128172 -0.2205385 -0.2543048 0.0072929 -0.0395488 -0.1819667 -0.1274123 0.1002120 0.1103527 -0.1696727 -0.1136359 -0.0098169 0.0671247 -0.0303907 -0.0348485 0.0532381 0.0632165 0.0888605 0.0974892 -0.1258101 -0.1042962 -0.1203997 0.0096978 -0.0033718 -0.1579571 -0.0857641 -0.0983888 -0.0898411 -0.0083221 0.1003071 -0.1940303 -0.1533536 -0.1741282 -0.0517033 -0.0443442 -0.0488961 -0.0019377 0.0204819 0.0022425 0.1093201 0.0640986 0.1023118 0.1313288 0.0898794 0.1783257 0.1105455 0.0310629 0.1630676 -0.0071280 -0.0256671 -0.0319788 0.0906354 0.1541713 0.1581612 0.0993658 0.0373077 0.0887085 -0.0280864 -0.0002732 -0.0010655 1.0000000 0.0033779 -0.1930351
icustay_id…1 -0.0084589 -0.0101197 -0.0242882 -0.0165423 -0.0005640 0.0089577 0.0298233 -0.0184437 0.0120199 0.0234918 -0.0076237 0.0165218 0.0052015 0.0055870 -0.0076536 0.0010170 0.0019407 0.0175538 0.0311391 0.0319101 0.0277926 0.0334956 0.0084118 0.0257046 0.0218740 -0.0209936 -0.0211086 0.0039428 0.0251347 0.0027774 -0.0069757 0.0059208 0.0234603 0.0097082 0.0203694 0.0157239 0.0085409 0.0125998 0.0113965 -0.0060132 -0.0236428 -0.0111424 0.0308664 0.0000421 0.0119519 0.0293459 0.0033580 0.0182551 0.0221147 0.0157994 0.0231551 0.0003704 -0.0390161 -0.0180761 -0.0104526 -0.0064338 -0.0051685 0.0257457 0.0062212 0.0272801 0.0152148 0.0232591 0.0235955 0.0033779 1.0000000 0.0164486
thirtyday_expire_flag -0.0173108 0.1772220 -0.0102241 -0.1813401 0.3237256 0.3729420 0.1331194 0.1526530 0.2495941 0.2294968 -0.1767267 -0.1352511 0.0941372 0.0776271 -0.0287081 -0.0032726 0.0149494 0.0611368 -0.0064443 -0.0303086 -0.0471794 -0.0597614 0.2690391 0.2471064 0.2752361 -0.0101746 0.0022787 0.1088537 0.1003650 0.1474604 0.1375304 -0.0088820 0.0239082 0.2200017 0.1952228 0.2092219 0.1124565 0.0901716 0.1023994 0.0200838 0.1112983 0.1001082 -0.2276601 -0.0345566 -0.1547163 -0.1848383 -0.0063294 -0.1092095 -0.2021961 0.0258221 -0.1370553 0.0999479 0.1509153 0.2023105 -0.1561575 -0.1345385 -0.1765326 -0.2135070 -0.0510881 -0.1779191 0.0332204 -0.0071976 -0.0058062 -0.1930351 0.0164486 1.0000000
# Create a heatmap

#upper_tri <- matrixcalc::upper.triangle(correlation_auto)
#melted_cormat <- reshape2::melt(upper_tri, na.rm = TRUE)

melted_cormat <- reshape2::melt(correlation_matrix, na.rm = TRUE)

ggplot(data = melted_cormat, aes(Var2, Var1, fill = value))+
 geom_tile(color = "white")+
 scale_fill_gradient2(low = "blue", high = "red", mid = "white", 
   midpoint = 0, limit = c(-1,1), space = "Lab", 
   name="Pearson\nCorrelation") +
  theme_minimal()+ 
 theme(axis.text.x = element_text(angle = 45, vjust = 1, 
     hjust = 1))+
 coord_fixed() #+

 # geom_text(aes(Var2, Var1, label = if_else(value != 0, as.character(round(value, digits = 2)), " ")))

Interactive

# Load necessary packages
library(ggplot2)
library(reshape2)
library(plotly)
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
library(Hmisc)
## 
## Attaching package: 'Hmisc'
## The following object is masked from 'package:plotly':
## 
##     subplot
## The following objects are masked from 'package:dplyr':
## 
##     src, summarize
## The following objects are masked from 'package:base':
## 
##     format.pval, units
# Compute the correlation matrix and p-values
cor_res <- rcorr(as.matrix(data_numeric))

cor_mat <- cor_res$r        # Correlation coefficients
p_mat <- cor_res$P          # P-values

# Melt the correlation matrix and p-value matrix into long format
cor_mat_melt <- melt(cor_mat)
p_mat_melt <- melt(p_mat)

# Rename columns for clarity
colnames(cor_mat_melt) <- c("Var1", "Var2", "Correlation")
colnames(p_mat_melt) <- c("Var1", "Var2", "p_value")

# Combine the correlation and p-value data
cor_mat_melt$p_value <- p_mat_melt$p_value

# Create a column for significance asterisks
cor_mat_melt$signif <- ifelse(cor_mat_melt$p_value < 0.05, "*", "")

# Create a ggplot heatmap with custom text for tooltips
p <- ggplot(cor_mat_melt, aes(
    x = Var1,
    y = Var2,
    fill = Correlation,
    text = paste0(
        "Variables: ", Var1, " & ", Var2, "<br>",
        "Correlation: ", round(Correlation, 2), "<br>",
        "p-value: ", signif(p_value, 2)
    )
)) +
    geom_tile() +
    geom_text(aes(label = signif), color = "black", size = 1) +
    scale_fill_gradient2(low = "blue", mid = "white", high = "red", midpoint = 0) +
    theme_minimal() +
    theme(
        axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1)
    )

# Convert ggplot object to an interactive Plotly object
p_interactive <- ggplotly(p, tooltip = "text")

# Display the interactive heatmap
p_interactive